<html>
	<head>
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7/dijit/themes/tundra/tundra.css" />
        <script type="text/javascript">
            var dojoConfig = {
                parseOnLoad: true,
                isDebug: true,
                locale: 'ru-ru',
            };
        </script>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7/dojo/dojo.js"></script>

        <script type="text/javascript">
            dojo.ready(function() {
                require(['dojo/_base/fx', 'dojo/fx'], function(fx, coreFx) {
                    animation1 = fx.fadeOut({
                        duration : 3000,
                        node     : dojo.byId('mainDiv'),
                        onEnd    : function (n) {
                            n.innerHTML = '';
                        },
                        beforeBegin : function(n) {
                            n.innerHTML = 'Пока!';
                        }
                    });
                   
                    
                    
                    animation2 = fx.animateProperty({
                        duration : 3000,
                        node : 'secondDiv',
                        properties : {
                            height : 300
                        }
                    });
                    coreFx.combine([animation1, animation2]).play();
                   
                });
            });
        </script>


    </head>
    <body class="tundra">
        
        <div id="mainDiv">
            Первый элемент
        </div>
        <div id="secondDiv" style="border:1px solid red;">
            Второй элемент
        </div>
    </body>
</html>